{% extends 'base.html' %}
{% block content %}
<div class="card">
  <h2>添加银行卡</h2>
  <form method="POST">
    <div class="form-group">
      <label>卡号</label>
      <input type="text" name="cardID" required>
    </div>

    <div class="form-group">
      <label>存款类型</label>
      <input type="text" name="type" required>
    </div>

    <div class="form-group">
      <label>开户日期</label>
      <input type="date" name="openDate" required>
    </div>

    <div class="form-group">
      <label>开户金额</label>
      <input type="number" name="initAmount" step="0.01" required>
    </div>

    <div class="form-group">
      <label>当前余额</label>
      <input type="number" name="balance" step="0.01" required>
    </div>

    <div class="form-group">
      <label>密码</label>
      <input type="text" name="pass" required>
    </div>

    <div class="form-group">
      <label>是否挂失</label>
      <input type="checkbox" name="lost">
    </div>

    <div class="form-group">
      <label>所属客户编号</label>
      <select name="customerID" required>
        {% for c in customers %}
        <option value="{{ c.customerID }}">{{ c.customerID }} - {{ c.customerName }}</option>
        {% endfor %}
      </select>
    </div>

    <button type="submit" class="btn">提交</button>
    <a href="{{ url_for('cards') }}" class="btn">返回</a>
  </form>
</div>
{% endblock %}
